<#import "../tpl/pageTep.ftl" as page>
<@page.pageBase currentMenu="收款登记">

    <!--suppress ALL -->
    <form id="searchForm" class="form-panel">
        <a href="${basepath}/rest/manage/finance/toList" class="backPage">返回上一级</a>
        <ul class="panel-content">
            <li>
                <div class="form-actions">
                    <div class="control-group controls span5">
                        <input type="text" class="input-normal  input-pad" name="name" placeholder="请输入关键字搜索">
                    </div>
                    <div class="form-actions  controls">
                        <button type="submit" class="button  button-primary">
                            查询
                        </button>
                    </div>

                </div>
            </li>
        </ul>
    </form>
    <div id="grid"></div>
<script>
    var contractID = getQueryString('contractID');//拿合同的id
    var Grid = BUI.Grid,
            Store = BUI.Data.Store,
            columns = [
                {title : '序号',elCls: 'center',
                    dataIndex: 'id',
                    width: '20%',
                    renderer: function (value, obj, index) {
                        return index + 1;
                    }
                },
                {title : '委托书名称', dataIndex: 'name', elCls: 'center', width: '20%'},
                {title : '委托书编号', dataIndex: 'sno', elCls: 'center', width: '20%'},
                {title : '需缴纳金额',dataIndex :'proxyMoney', elCls: 'center', width: '20%'},
                {title : '收款金额',dataIndex :'proxyGetMoney',elCls: 'center', width: '20%'}

            ];

    var store = new Store({
                url : '/rest/manage/proxy/selectFinanceProxyPage?contractID='+contractID+'',
                autoLoad:true, //自动加载数据
                params : { //配置初始请求的参数
                    length : '10',
                    status:$("#status").val()
                },
                pageSize:10,	// 配置分页数目
                root : 'list',
                totalProperty : 'total'
            }),
            grid = new Grid.Grid({
                render:'#grid',
                columns : columns,
                loadMask: true, //加载数据时显示屏蔽层
                store: store,
                plugins : [Grid.Plugins.CheckSelection], // 插件形式引入多选表格
                // 底部工具栏
                bbar:{
                    pagingBar:true
                }
            });

    grid.render();
</script>

</@page.pageBase>
